'   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '           N a m e :   C o r e X Y _ 0 6 . t x t                                                 D a t e :   2 0   D i c e m b e r   2 0 1 9 
 
 '         A u t o r :   L e o n a r d o   D E   P A L O   P h . D . 
 
 '         S c o p e :   T e s t   C O R E X Y   f r o m   W i n g o 
 
 '   H a r d w a r e :   S t a n d a r d   M a s t e r . 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 L o a d   T o c . w a v 
 
 G o s u b   " P E N   U P " 
 
 S p e e d   9 
 
 
 
 B u t t o n   1   T e x t   " D E M O " 
 
 B u t t o n   2   T e x t   " M U L T I " 
 
 B u t t o n   3   T e x t   " Z E R O I N G " 
 
 B u t t o n   4   T e x t   " R e s e t T o D e s t X Y   C o r e X Y " 
 
 
 
 B u t t o n   5   T e x t   " P E N   U P " 
 
 B u t t o n   6   T e x t   " P E N   D O W N " 
 
 
 
 B u t t o n   7   T e x t   " D I S A B L E   M O T O R " 
 
 
 
 B u t t o n   8   T e x t   " C L O S E   A L L " 
 
 
 
 L o a d   . . \ T h e r e m i n o _ H A L \ T h e r e m i n o _ H A L . e x e 
 
 L o a d   . . \ T h e r e m i n o _ H A L \ T h e r e m i n o _ S l o t V i e w e r . e x e 
 
 ' L o a d   . . \ T h e r e m i n o _ H A L \ T h e r e m i n o _ S i g n a l S c o p e . e x e 
 
 ' L o a d   . . \ T h e r e m i n o _ M i c r o V i d e o \ T h e r e m i n o _ M i c r o V i d e o \ T h e r e m i n o _ M i c r o V i d e o . e x e 
 
 
 
 
 
 S t o p 
 
 
 
 L a b e l   Z E R O I N G 
 
 	 G o s u b   " P E N   U P " 
 
 	 G o s u b   H o m e X 
 
 	 G o s u b   H o m e Y 
 
 R e t u r n 
 
 
 
 L a b e l   M U L T I 
 
 	 v 1   =   I n p u t 
 
 	 F o r   v 2   =   1   T o   v 1 
 
 	 	 G o s u b   D E M O 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 L a b e l   " D E M O " 
 
 	 S l o t ( 5 )   =   1 0 0 0 
 
 	 G o s u b   " P E N   U P " 
 
 	 W a i t   S e c o n d s   0 . 2 
 
 	 
 
 	 D e s t X   =   0 
 
 	 D e s t Y   =   0 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   1 
 
 	 D e s t Y   =   8 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 
 
 	 D e s t X   =   1 5 
 
 	 D e s t Y   =   8 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   1 4 
 
 	 D e s t Y   =   1 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   7 
 
 	 D e s t Y   =   4 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 
 
 	 D e s t X   =   8 
 
 	 D e s t Y   =   1 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   5 
 
 	 D e s t Y   =   3 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   7 
 
 	 D e s t Y   =   4 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   4 
 
 	 D e s t Y   =   3 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   1 
 
 	 D e s t Y   =   1 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   8 
 
 	 D e s t Y   =   4 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   1 5 
 
 	 D e s t Y   =   8 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   1 5 
 
 	 D e s t Y   =   1 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   8 
 
 	 D e s t Y   =   1 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P e n A c t i o n 
 
 	 
 
 	 D e s t X   =   1 8 
 
 	 D e s t Y   =   5 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   " D I S A B L E   M O T O R " 
 
 R e t u r n 
 
 
 
 L a b e l   P e n A c t i o n 
 
 	 G o s u b   " P E N   D O W N " 
 
 	 W a i t   S e c o n d s   0 . 5 
 
 	 G o s u b   " P E N   U P " 
 
 	 W a i t   S e c o n d s   0 . 2 
 
 R e t u r n 
 
 
 
 L a b e l   " P E N   U P " 
 
 	 S l o t ( 6 )   =   1 9 0 
 
 	 W a i t   S e c o n d s   0 . 5 
 
 R e t u r n 
 
 
 
 L a b e l   " P E N   D O W N " 
 
 	 S l o t ( 6 )   =   5 0 0 
 
 	 W a i t   S e c o n d s   0 . 5 
 
 R e t u r n 
 
 
 
 L a b e l   " D I S A B L E   M O T O R " 
 
 	 G o s u b   W a i t M o t o r 
 
 	 S l o t ( 5 )   =   0 
 
 	 W a i t   S e c o n d s   0 . 8 
 
 R e t u r n 
 
 
 
 L a b e l   " C L O S E   A L L " 
 
 	 L o a d   C l o s e A p p s 
 
 R e t u r n 
 
 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '     W   A   I   T   u n t i l   t h e   m o t o r ( S l o t M o t o r )   i s   s t o p p e d 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 L a b e l   W a i t M o t o r 
 
 '   - - - - - - - - - - - - - - - - - -   t h i s   W a i t   e n s u r e s   t h a t   t h e   m o t o r s   a r e   r u n n i n g 
 
 	 W a i t   S e c o n d s   0 . 1 
 
 	 L a b e l   W a i t 1 	 	 	 	 	 	 	 	 	   ' B r e a k p o i n t 
 
 	 	 I f   A b s ( S l o t ( 2 ) )   <   0 . 0 1 
 
 	 	 	 I f   A b s ( S l o t ( 4 ) )   <   0 . 0 1 
 
 	 	 	 	 R e t u r n 	 	 	 	 	 	 	   ' B r e a k p o i n t 
 
 	 	 	 E n d I f 
 
 	 	 E n d I f 
 
 	 	 W a i t   S e c o n d s   0 . 0 0 5 
 
 	 G o t o   W a i t 1 
 
 G o t o   W a i t M o t o r 
 
 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '     C O R E   X Y 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 V a r i a b l e   N u m e r i c   D e s t X 
 
 V a r i a b l e   N u m e r i c   D e s t Y 
 
 
 
 L a b e l   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 G o s u b   P r e p a r e C o r e X Y A B 
 
 	 S l o t ( 1 )   =   C o r e A 
 
 	 S l o t ( 3 )   =   C o r e B 
 
 	 G o s u b   W a i t M o t o r 
 
 R e t u r n 
 
 
 
 L a b e l   " R e s e t T o D e s t X Y   C o r e X Y " 
 
         '   - - - - - - - - - - - - - - - - - - - - - - - - -   R e s e t   a x i s   X   a n d   Y 
 
 	 S l o t ( 1 )   =   R e s e t 
 
 	 S l o t ( 3 )   =   R e s e t 
 
 	 W a i t   S e c o n d s   0 . 1 5 0 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - -   S e t   r e s e t   v a l u e s   w i t h   C o r e X Y   c o r r e c t i o n 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 W a i t   S e c o n d s   0 . 1 5 0 
 
 R e t u r n 
 
 
 
 V a r i a b l e   N u m e r i c   C o r e A 
 
 V a r i a b l e   N u m e r i c   C o r e B 
 
 L a b e l   P r e p a r e C o r e X Y A B 
 
 	 C o r e A   =   ( D e s t X   -   D e s t Y )   /   2 
 
 	 C o r e B   =   ( D e s t X   +   D e s t Y )   /   2 
 
 R e t u r n 
 
 
 
 
 
 '   = = = = = = = = = = = = = = =   H O M E   M O T O R   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 V a r i a b l e   N u m e r i c   H o m e A x i s 
 
 V a r i a b l e   N u m e r i c   S l o t S e n s o r 
 
 V a r i a b l e   N u m e r i c   D e t a c h M M 
 
 V a r i a b l e   N u m e r i c   S p e e d S e a r c h 
 
 V a r i a b l e   N u m e r i c   S p e e d R e t u r n 
 
 V a r i a b l e   N u m e r i c   D e c l a r e d Z e r o 
 
 V a r i a b l e   N u m e r i c   I n i t i a l P o s i t i o n 
 
 
 
 L a b e l   H o m e X 
 
 	 H o m e A x i s   =   0                 	 '   0   =   A x i s   X 
 
 	 S l o t S e n s o r   =   8 	 	 	 '   h o m e   s e n s o r   s l o t 
 
 	 D e t a c h M M   =   + 2 	 	 	 '   d e t a c h   m o v e m e n t   m m   ( n e g   o r   p o s ) 
 
 	 S p e e d S e a r c h   =   - 0 . 1 	 	 '   d i r e c t i o n   a n d   s p e e d 
 
 	 S p e e d R e t u r n   =   + 0 . 0 0 5 	 '   d i r e c t i o n   a n d   s p e e d 
 
 	 D e c l a r e d Z e r o   =   0 	 	 '   d e c l a r e d   f i n a l   M M 
 
 	 I n i t i a l P o s i t i o n   =   1           '   m o v e   t o   M M 
 
 	 G o s u b   " H o m e " 
 
 R e t u r n 
 
 
 
 L a b e l   H o m e Y 
 
 	 H o m e A x i s   =   1                 	 '   1   =   A x i s   Y 
 
 	 S l o t S e n s o r   =   7 	 	 	 '   h o m e   s e n s o r   s l o t 
 
 	 D e t a c h M M   =   + 2 	 	 	 '   d e t a c h   m o v e m e n t   m m   ( n e g   o r   p o s ) 
 
 	 S p e e d S e a r c h   =   - 0 . 1 	 	 '   d i r e c t i o n   a n d   s p e e d 
 
 	 S p e e d R e t u r n   =   + 0 . 0 5 	 	 '   d i r e c t i o n   a n d   s p e e d 
 
 	 D e c l a r e d Z e r o   =   0 	 	 '   d e c l a r e d   f i n a l   M M 
 
 	 I n i t i a l P o s i t i o n   =   1           '   m o v e   t o   M M 
 
 	 G o s u b   H o m e 
 
 R e t u r n 
 
 
 
 L a b e l   H o m e 
 
 	 I f   S l o t ( S l o t S e n s o r )   >   5 0 0   '   d e t a c h   i f   s e n s o r   a c t i v e 
 
 	 	 I f   H o m e A x i s   =   0 
 
 	 	 	 D e s t X   =   D e s t X   +   D e t a c h M M 
 
 	 	 E l s e 
 
 	 	 	 D e s t Y   =   D e s t Y   +   D e t a c h M M 
 
 	 	 E n d I f 
 
 	 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 E n d I f 
 
 ' 
 
 L a b e l   S e a r c h H o m e 
 
 	 I f   H o m e A x i s   =   0 
 
 	 	 D e s t X   =   D e s t X   +   S p e e d S e a r c h   
 
 	 E l s e 
 
 	 	 D e s t Y   =   D e s t Y   +   S p e e d S e a r c h 
 
 	 E n d I f 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 ' 
 
 	 W a i t   S e c o n d s   0 . 0 0 1 
 
 	 I f   S l o t ( S l o t S e n s o r )   >   5 0 0 
 
 	 	 G o s u b   W a i t M o t o r 
 
 	 	 G o t o   D e t a c h S e n s o r 
 
 	 E n d I f 
 
 G o t o   S e a r c h H o m e 
 
 ' 
 
 L a b e l   D e t a c h S e n s o r 
 
 	 I f   H o m e A x i s   =   0 
 
 	 	 D e s t X   =   D e s t X   +   S p e e d R e t u r n 
 
 	 E l s e 
 
 	 	 D e s t Y   =   D e s t Y   +   S p e e d R e t u r n 
 
 	 E n d I f 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 ' 
 
 	 W a i t   S e c o n d s   0 . 0 0 1 
 
 	 I f   S l o t   ( S l o t S e n s o r )   <   5 0 0 
 
 	 	 G o s u b   W a i t M o t o r 
 
 	 	 G o t o   A s s i g n Z e r o 
 
 	 E n d I f 
 
 G o t o   D e t a c h S e n s o r 
 
 ' 
 
 L a b e l   A s s i g n Z e r o 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   R e s e t 
 
 	 G o s u b   " R e s e t T o D e s t X Y   C o r e X Y " 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   D e c l a r e d   z e r o 
 
 	 I f   H o m e A x i s   =   0 
 
 	 	 D e s t X   =   D e c l a r e d Z e r o 
 
 	 E l s e 
 
 	 	 D e s t Y   =   D e c l a r e d Z e r o 
 
 	 E n d I f 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   I n i t i a l   p o s i t i o n 
 
 	 I f   H o m e A x i s   =   0 
 
 	 	 D e s t X   =   I n i t i a l P o s i t i o n 
 
 	 E l s e 
 
 	 	 D e s t Y   =   I n i t i a l P o s i t i o n 
 
 	 E n d I f 
 
 	 G o s u b   M o v e T o D e s t X Y _ C o r e X Y 
 
 R e t u r n 
 
 
 
 
 
 ' W A T C H   C O M _ S t a t u s 
 
 